// Block.cpp: implementation of the CBlock class.
//
//////////////////////////////////////////////////////////////////////

#include "Block.h"
#include "backbuffer.h"
#include "Card.h"

extern int ShowCards;

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CBlock::CBlock()
{
	this->Init();
}

CBlock::~CBlock()
{

}

bool CBlock::CheckPushPrecondition(const CCard &_card)
{
	return true;
}

void CBlock::Init()
{
	RemoveAll();
	this->Fill();
	this->Shuffle();
}

void CBlock::Draw(unsigned int _x, unsigned int _y, bool selected )
{
    throw "Draw is not implemented!";
}

bool CBlock::IncreaseSelection()
{
	if( cards_stored && cards_selected < ShowCards )
	{
		cards_selected++;
		return true;
	}
	return false;
}
